home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 February / Macworld (1999-02).dmg / Games World / SharewareGames / Ultimate Blackjack / Ultimate Blackjack v2.1 / Ultimate Blackjack v2.1.rsrc / TEXT_129.txt < prev    next >
Text File  |  1998-12-06  |  3KB  |  7 lines

  1. This simulation mode explores the capability of a computer to learn how to play Blackjack by using a popular theory called the Genetic Algorithm which is based on the principals of evolution and natural selection. In the animal kingdom, the ability of each animal to survive in their environment and prosper is influenced significantly by the animal‚Äôs genetic makeup. The animals that are the strongest will earn the right to mate and produce offspring. In this way the better genes are passed on to the next generation. And the offspring of two parents that are superior in their ability to survive, should also be superior. An important wildcard aspect of evolution is genetic mutation which allows children to have abilities their parents did not. Mutations in nature are genetic changes that occur from incorrect copying of the DNA code or from environmental factors like radiation. Some mutations can be an advantage if they help the animal survive while others can be a disadvantage that will die out.
  2.  
  3. Back to Blackjack. The program uses a population of 36 players, whose Blackjack DNA is the strategy information which tells them whether to take a card, stand, double down, split a pair, or take insurance. At the start this information is just randomly initialized. Or the user may choose to set this information themselves for the six players that produce the first generation.
  4.  
  5. To give each player an opportunity to prove themselves, the 36 players are divided evenly amoung six tables. At each table, several rounds are played for the specified number of hands. The winner of a single round may be influenced by luck, so a number of rounds can be played to enable the player with the best strategy to be determined. The player whose earnings from all the rounds is the largest is judged to be the best and selected to produce the next generation.  By mating the six best players with each other, a new generation of 36 players is obtained. The children‚Äôs playing strategy, or DNA, is created by each card combination being copied from one parent or the other, with a 50%, 50% chance for each. During this offspring production, mutations which are just random changes to the DNA code (or playing strategies) will occur. The user specifies a mutation rate in the dialog box as the number of changes per 1000 genes. You may wish to select a larger mutation rate at the beginning and then reduce it as the players are getting better.
  6.  
  7. Like real evolution the genetic algorithm takes time. After each round is completed, the statistics are shown on the screen for the best player. You can keep tabs on progress by watching the ending balance to see if it is improving. Also the DNA of the best players can be monitored as they converge to the best strategy. Select ‚ÄúShow Best Player‚Äôs DNA‚Äù under the ‚ÄúSimulation‚Äù menu to examine the DNA of the best player at each table. The tables that have not yet been completed will not show any values. The program will run until stopped by the user selecting another simulation mode or to play Blackjack.